package com.wzz.seckillone.activeMq.base;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.stereotype.Component;

import javax.jms.Queue;

/**
 * @ProjectName: seckillOne
 * @Package: com.wzz.seckillone.activeMq
 * @ClassName: QueueDemo
 * @Author: wzz
 * @Description:
 * @Date: 2022/3/20 15:44
 * @Version: 1.0
 */
@Component
@EnableJms
public class QueueDestination {

    @Value("${myQueue}")
    private String queueName;

    @Bean
    public Queue queue(){
        return new ActiveMQQueue(queueName);
    }
}
